<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            background-color: red;
            /* 圆角边框 */
            /* border-radius: 50%; */
            animation-name: move;
            /* 设置时间 */
            animation-duration: 2s;
            /* 动画速度曲线 */
            animation-timing-function: linear;
            /*  设置动画执行次数 number  infinite执行无数次*/
            animation-iteration-count: infinite;
            /* 动画反向执行 */
            animation-direction: alternate;
        }
        /* 定义动画关键帧 */
        @keyframes move{
            /* from开始 to结束 */
            /* transfrom形变 平移 旋转 缩放 */
            /* from{

                transform: translate(0px);
            }
            to{
                transform: translate(200px);
            } */
             0%{
                /* transform 形变 rotate旋转 */
                transform: translate(0px) rotate(0deg);
             }
             25%{
                transform: translate(50px) rotate(90deg);
                background-color: pink;
                border-radius: 10px;
             }
             50%{
                transform: translate(100px) rotate(180deg);
                background-color: orange;
                border-radius: 20px;
             }
             75%{
                transform: translate(150px) rotate(270deg);
                background-color: cyan;
                border-radius: 35px;
             }
            100%{
                transform: translate(200px) rotate(360deg);
                background-color: blueviolet;
                border-radius: 50%;
             }

        }
        /* 定义心跳动画 */
        @keyframes scale{
            from{
                transform: none;
            }
            to{
                /* scale缩放 >1放大 */
                transform: scale(1.2);
            }
        }
        img{
            margin-top: 20px;
            animation: scale .2s linear infinite alternate;
        }
    </style>
</head>
<body>
    <div></div>
    <img width="150px" src="../音视频/1.webp" alt="">
</body>
</html>